package web

import (
	"net/http"

	"gitee.com/thinkerwolf/GoStudy/util"
)

func TestGetPaymentProvider(host string) error {
	url := host + "/api/payment/config/metadata/providers/v2"

	tenantId := "234824145"
	secret := "543da9eb5431bcbd"
	httpReq, err := util.CreateMemberSiteGetRequest(url, "X-Tenant-Authorization", tenantId, secret)
	if err != nil {
		return err
	}
	httpReq.Header.Add("tenantId", tenantId)

	httpResp, err := http.DefaultClient.Do(httpReq)
	if err != nil {
		return err
	}
	defer httpResp.Body.Close()
	util.LogHttpResponse(httpResp)
	return nil
}
